using System;
using System.Collections.Generic;
using System.Text;

namespace GriffinNav.GPS
{
    internal static class Conversion
    {
        // Conversion factors
        private const decimal M_KNOT_TO_MPH_FACTOR = 1.15077945M;
        private const decimal M_KNOT_TO_KPH_FACTOR = 1.852M;
        private const decimal M_METER_TO_FOOT_FACTOR = 3.2808399M;

        // Convert knots to miles per hour
        internal static decimal KnotsToMph(decimal knots)
        {
            return knots * M_KNOT_TO_MPH_FACTOR;
        }

        // Convert knots to kilometers per hour
        internal static decimal KnotsToKph(decimal knots)
        {
            return knots * M_KNOT_TO_KPH_FACTOR;
        }

        // Convert meters to feet
        internal static decimal MetersToFeet(decimal meters)
        {
            return meters * M_METER_TO_FOOT_FACTOR;
        }
    }
}
